# 第一阶段，获得所有page所在的的url并测试其是否可被爬取,全部验证通过才
# 可开始第二阶段,否则剔除的url，再进行下一阶段
import utils
url="http://127.0.0.1:8000/demo/books?keyword=0-佛"
# ---------------------------------------------------------------------------------------------------------

all_pages=["http://127.0.0.1:8000/demo/books?keyword="+str(i)+"-佛" for i in range(28)][2:20]
val_code="textlist"

# ---------------------------------------------------------------------------------------------------------
success_pages=utils.check_pages(all_pages,val_code,interval=0.37)
utils.save_file("step1ed.pkl",success_pages)
# print(all_pages)



